package com.su.lightthings.ble

import android.bluetooth.BluetoothProfile
import com.jieli.jl_bt_ota.constant.StateCode


object OtaUtil {
    fun changeConnectStatus(status: Int): Int {
        var changeStatus = StateCode.CONNECTION_DISCONNECT
        when (status) {
            BluetoothProfile.STATE_DISCONNECTED,
            BluetoothProfile.STATE_DISCONNECTING -> changeStatus = StateCode.CONNECTION_DISCONNECT
            BluetoothProfile.STATE_CONNECTED -> changeStatus = StateCode.CONNECTION_OK
            BluetoothProfile.STATE_CONNECTING -> changeStatus = StateCode.CONNECTION_CONNECTING
        }
        return changeStatus
    }

}